python replace all new lines with space

39

python replace all new lines with space -

# you probably want to use a space ' ' to replace `\n`
mystring = mystring.replace('\n', ' ').replace('\r', '')

Comments

Submit
0 Comments